//package com.example.demo.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * @program: demo
// * @description: 跨域配置
// * @author: liulei
// * @create: 2021-12-02 01:15
// **/
//@Component
//public class CorssConfig {
//    @Bean
//    public WebMvcConfigurer CorssConfig(){
//        return new WebMvcConfigurer() {
//            @Override
//            public void addCorsMappings(CorsRegistry registry) {
//                registry.addMapping("/**")
//                        .allowedOrigins("http://106.15.228.27:19111")
//                        .allowedMethods("GET","POST","DELETE","PUT","OPTIONS")
//                        .allowCredentials(false).maxAge(3600);
//            }
//        };
//    }
//}
